package com.eaoa.vo.bus.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the bus_transfer table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="bus_transfer"
 */

public abstract class BaseBusTransfer  implements Serializable {

	public static String REF = "BusTransfer";
	public static String PROP_COST = "cost";
	public static String PROP_BUS_VEHICLE = "busVehicle";
	public static String PROP_CREATOR = "creator";
	public static String PROP_ISLOCK = "islock";
	public static String PROP_CREATORNAME = "creatorname";
	public static String PROP_TRANSFERNO = "transferno";
	public static String PROP_BILLSTATUS = "billstatus";
	public static String PROP_CREATDATE = "creatdate";
	public static String PROP_BILLCODE = "billcode";


	// constructors
	public BaseBusTransfer () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseBusTransfer (java.lang.Long transferno) {
		this.setTransferno(transferno);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseBusTransfer (
		java.lang.Long transferno,
		com.eaoa.vo.bus.BusVehicle busVehicle) {

		this.setTransferno(transferno);
		this.setBusVehicle(busVehicle);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long transferno;

	// fields
	private java.lang.String billcode;
	private java.lang.String billstatus;
	private java.math.BigDecimal cost;
	private java.lang.Long creator;
	private java.lang.String creatorname;
	private java.util.Date creatdate;
	private java.lang.String islock;

	// many to one
	private com.eaoa.vo.bus.BusVehicle busVehicle;

	// collections
	private java.util.Set<com.eaoa.vo.bus.BusOrder> busOrders;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="increment"
     *  column="transferno"
     */
	public java.lang.Long getTransferno () {
		return transferno;
	}

	/**
	 * Set the unique identifier of this class
	 * @param transferno the new ID
	 */
	public void setTransferno (java.lang.Long transferno) {
		this.transferno = transferno;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: billcode
	 */
	public java.lang.String getBillcode () {
		return billcode;
	}

	/**
	 * Set the value related to the column: billcode
	 * @param billcode the billcode value
	 */
	public void setBillcode (java.lang.String billcode) {
		this.billcode = billcode;
	}



	/**
	 * Return the value associated with the column: billstatus
	 */
	public java.lang.String getBillstatus () {
		return billstatus;
	}

	/**
	 * Set the value related to the column: billstatus
	 * @param billstatus the billstatus value
	 */
	public void setBillstatus (java.lang.String billstatus) {
		this.billstatus = billstatus;
	}



	/**
	 * Return the value associated with the column: cost
	 */
	public java.math.BigDecimal getCost () {
		return cost;
	}

	/**
	 * Set the value related to the column: cost
	 * @param cost the cost value
	 */
	public void setCost (java.math.BigDecimal cost) {
		this.cost = cost;
	}



	/**
	 * Return the value associated with the column: creator
	 */
	public java.lang.Long getCreator () {
		return creator;
	}

	/**
	 * Set the value related to the column: creator
	 * @param creator the creator value
	 */
	public void setCreator (java.lang.Long creator) {
		this.creator = creator;
	}



	/**
	 * Return the value associated with the column: creatorname
	 */
	public java.lang.String getCreatorname () {
		return creatorname;
	}

	/**
	 * Set the value related to the column: creatorname
	 * @param creatorname the creatorname value
	 */
	public void setCreatorname (java.lang.String creatorname) {
		this.creatorname = creatorname;
	}



	/**
	 * Return the value associated with the column: creatdate
	 */
	public java.util.Date getCreatdate () {
		return creatdate;
	}

	/**
	 * Set the value related to the column: creatdate
	 * @param creatdate the creatdate value
	 */
	public void setCreatdate (java.util.Date creatdate) {
		this.creatdate = creatdate;
	}



	/**
	 * Return the value associated with the column: islock
	 */
	public java.lang.String getIslock () {
		return islock;
	}

	/**
	 * Set the value related to the column: islock
	 * @param islock the islock value
	 */
	public void setIslock (java.lang.String islock) {
		this.islock = islock;
	}



	/**
	 * Return the value associated with the column: vehicleno
	 */
	public com.eaoa.vo.bus.BusVehicle getBusVehicle () {
		return busVehicle;
	}

	/**
	 * Set the value related to the column: vehicleno
	 * @param busVehicle the vehicleno value
	 */
	public void setBusVehicle (com.eaoa.vo.bus.BusVehicle busVehicle) {
		this.busVehicle = busVehicle;
	}



	/**
	 * Return the value associated with the column: busOrders
	 */
	public java.util.Set<com.eaoa.vo.bus.BusOrder> getBusOrders () {
		return busOrders;
	}

	/**
	 * Set the value related to the column: busOrders
	 * @param busOrders the busOrders value
	 */
	public void setBusOrders (java.util.Set<com.eaoa.vo.bus.BusOrder> busOrders) {
		this.busOrders = busOrders;
	}

	public void addTobusOrders (com.eaoa.vo.bus.BusOrder busOrder) {
		if (null == getBusOrders()) setBusOrders(new java.util.TreeSet<com.eaoa.vo.bus.BusOrder>());
		getBusOrders().add(busOrder);
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.eaoa.vo.bus.BusTransfer)) return false;
		else {
			com.eaoa.vo.bus.BusTransfer busTransfer = (com.eaoa.vo.bus.BusTransfer) obj;
			if (null == this.getTransferno() || null == busTransfer.getTransferno()) return false;
			else return (this.getTransferno().equals(busTransfer.getTransferno()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getTransferno()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getTransferno().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}